package com.maiji.cloud.microservice;

import com.maiji.cloud.request.BaseDataReqDto;
import com.maiji.cloud.response.BaseMetaResDto;
import com.maiji.cloud.response.shopingmall.GoodsResData;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

@FeignClient(value = "MAIJICLOUD-SHOPINGMALL")
public interface GoodsService {

    /**
     *  根据食材ID获取关联商品列表
     * @param baseDataReqDto
     * @return
     */
    @PostMapping("/goods/findAllGoodsByFoodId")
    BaseMetaResDto<List<GoodsResData>> findAllGoodsByFoodId(@RequestBody BaseDataReqDto<String> baseDataReqDto);

    /**
     *  根据食材ID[]获取关联商品列表
     * @param baseDataReqDto
     * @return
     */
    @PostMapping("/goods/findAllGoodsByFoodIds")
    BaseMetaResDto<List<GoodsResData>> findAllGoodsByFoodIds(@RequestBody BaseDataReqDto<List<String>> baseDataReqDto);

    /**
     *  根据商品ID[]获取关联商品列表
     * @param baseDataReqDto
     * @return
     */
    @PostMapping("/goods/findAllGoodsByIds")
    BaseMetaResDto<List<GoodsResData>> findAllGoodsByIds(@RequestBody BaseDataReqDto<List<String>> baseDataReqDto);

}
